<table border="1">
    
     <tr>
        <th>
            Id
        </th>
        <th>
            Nom
        </th>
        <th>
            Prenom
        </th>
    </tr>
    <?php foreach ($this->paginator as $unComptable): ?>
    <tr>
        <td>
            <?php echo $this->escape($unComptable->id); ?>
        </td>
        <td>
            <?php echo $this->escape($unComptable->nom); ?>
        </td>
        <td>
            <?php echo $this->escape($unComptable->prenom); ?>
        </td>
    </tr>
    <?php endforeach;?>
</table>
<?php
$pages = $this->paginator->getPages();
//var_dump($this->paginator);var_dump($pages);
if (isset($pages->first) && $pages->current != $pages->first) {
    echo"<a href=?page=$pages->first>Debut</a>&nbsp|&nbsp;";
}
if (isset($pages->previous)) {
    echo"<a href=?page=$pages->previous>Precedent</a>&nbsp|&nbsp;";
}
foreach ($pages->pagesInRange as $page) {
    echo "<a href=?page=$page>$page</a>&nbsp|&nbsp;";
}

if (isset($pages->next)) {
    echo"<a href=?page=$pages->next>Suivant</a>&nbsp|&nbsp;";
}
if (isset($pages->last) && $pages->current != $pages->last) {
    echo"<a href=?page=$pages->last>Fin</a>&nbsp";
}
?>